/*
 * Title:        CloudScheduler Toolkit
 * Description:  a Toolkit for Modeling and Simulation of Job Scheduling and Resource Provisioning in Cloud System
 * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html
 * Author:       Fuhui Wu
 *
 * Copyright (c) 2013-2014, The National University of Defense Technology, China
 */

package org.nudt.jCloud.fileSystem;

import java.util.ArrayList;
import java.util.List;

public class File {
	private int id;
	private String name;
	private List<Block> blockList;
	private int index = 0;
	
	public File(String name){
		setId(-1);
		setName(name);
		setBlockList(new ArrayList<Block>());
	}
	
	public void addBlock(Block block){
		block.setId(index++);
		blockList.add(block);
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public List<Block> getBlockList() {
		return blockList;
	}
	public void setBlockList(List<Block> blockList) {
		this.blockList = blockList;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
}
